<!DOCTYPE html>
<html>
<head>
    <% include common/meta.ejs %>
    <title>报修详情</title>
    <% include common/public.ejs %>
    <link rel="stylesheet" href="<%= global.config.publicPath %>/page/css/mall_wx.css"/>
    <style>
        li{
            padding-top: 10px;
        }
    </style>
</head>
<body ontouchstart class="">

<div class="news_xq">
    <ul>
        <li class="name"><%- data.name %></li>
        <li>处理编码：<span><strong><%= data.code %></strong></span></li>
    </ul>
</div>

<div class="weui_cells_title">位置详情</div>
<div class="weui_cells" style="font-size: 0.7rem;">
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>报修地址：</p>
        </div>
        <div class="weui_cell_ft">
            <%= data.address %>
        </div>
    </div>
</div>

<div class="weui_cells_title">处理人信息</div>
<div class="weui_cells" style="font-size: 0.7rem;">
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>处理人编号：</p>
        </div>
        <div class="weui_cell_ft">
            <p id="handleCode">空</p>
        </div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>报修时间：</p>
        </div>
        <div class="weui_cell_ft">
            <%=data.modifiedDate %>
        </div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>处理时间：</p>
        </div>
        <div class="weui_cell_ft">
            <%
            if(data.handleTime==null){
            %>
            <p>未处理</p>
            <%
            }else{
                var handleTime=data.handleTime;
            }
            %>
            <%=handleTime%>
        </div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>处理人联系电话：</p>
        </div>
        <div class="weui_cell_ft">
            <p id="phone">空</p>
        </div>
    </div>
</div>

<div class="weui_cells_title">保洁信息</div>
<div class="weui_cells" style="font-size: 0.7rem;">
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>保洁类型：</p>
        </div>
        <div class="weui_cell_ft">
            <%= data.type %>
        </div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>保洁描述：</p>
        </div>
        <div class="weui_cell_ft">
            <%=data.remark%>
        </div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd">
            <p>处理状态：</p>
        </div>
        <div class="weui_cell_ft">
            <%
            if(data.status==1){
            %>
            <p>未处理</p>
            <%
            }else{
            %>
            <p>已处理</p>
            <%
            }
            %>
        </div>
    </div>
</div>

<% include common/footer.ejs %>
<script>
    //获得处理人详细信息
    "use strict";
    $(document).ready(
        function () {
            let code=`<%=data.handleUser%>`;
            console.log(code);
            Dolphin.ajax({
                url: CTX + '/api/8874d41dec9a4b2f9e8e1feb4938a7e8@code='+code,
                type: 'get',
                forceUrl:'true',
                onSuccess: function (reData) {
                    if(reData.value){
                        if(reData.value.phone)
                            $('#phone').html(reData.value.phone);
                        else
                            $('#phone').html("未处理");
                        if(reData.value.code)
                            $('#handleCode').html(reData.value.code);
                        else
                            $('#handleCode').html("未处理");
                    }


                }
            })
        }
    );

</script>
</body>
</html>
